package com.future.common.utils;

import java.util.Date;

import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.DbKit;


public class DbUtil {
	/**
	 * 获取主数据源的日期
	 * @return
	 */
	public static Date getDbDateTime(){
		return getDbDateTime(DbKit.MAIN_CONFIG_NAME);
	}
	
	public static Date getDbDateTime(String datasource){
		return Db.use(datasource).findFirst(" select SYSDATE() now from dual ").getDate("now");
	}
}
